#ifndef PRODUCERTHREAD_H
#define PRODUCERTHREAD_H

#include <QThread>

#include <QWaitCondition>

class ProducerThread : public QThread
{
    Q_OBJECT

public:
    ProducerThread(int index,QWaitCondition *hasSpaceCond, QWaitCondition *hasDataCond );
public:
    inline void setStop(){stop = true;}
private:
    bool stop = false;
    int index = 0;
    QWaitCondition *hasSpaceCond;
    QWaitCondition *hasDataCond;
protected:
    void run() override;

};
#endif // PRODUCERTHREAD_H
